<?php
         include("../funcs/funcs.php");
         
		 
		 function islogin()
		 {
		       if(empty($GLOBALS['HTTP_COOKIE_VARS']['LoginName']))
			      return false;
			   return true;
		}
		
		/*function getloginschoolcode()
		{
		     return $GLOBALS['HTTP_COOKIE_VARS']['schoolCode'];
		}
		
		function getlogincollegecode()
		{
		     return $GLOBALS['HTTP_COOKIE_VARS']['collegeCode'];
		}
		
		function getlogintype()
		{
		     return $GLOBALS['HTTP_COOKIE_VARS']['userType'];
		}*/
		
		function getcondition()
       {
          $condition="";
          while($temp=each($GLOBALS['HTTP_POST_VARS']))
	     {
		 if($temp[1]!="")
		 {
		   if($temp[0]=="date"||$temp[0]=="dateto"||$temp[0]='job')
			       continue;
		    if($condition!="")
			  $condition.=" and ";
			$condition.=$temp[0]." like '%".$temp[1]."%'";
		 }		
	      }
	      return $condition;
      }
?>